package com.kyc.kycxkplaygame.util;


import com.kyc.kycxkplaygame.R;

import java.util.Random;

/**
 * Created by Administrator on 2017/9/4.
 */

public class LevelData {

    public static int[] daojishi = {R.drawable.t_3,R.drawable.t_2,R.drawable.t_1};

   /* public static int[] Image_level_01 = {R.drawable.icecream_01, R.drawable.icecream_02, R.drawable.icecream_03};
    public static int[][] level_01 =
            {{Image_level_01[0], Image_level_01[1], Image_level_01[2], Image_level_01[0], Image_level_01[1], Image_level_01[2]},
                    {Image_level_01[0], Image_level_01[1], Image_level_01[2], Image_level_01[1], Image_level_01[0], Image_level_01[2]},
                    {Image_level_01[0], Image_level_01[1], Image_level_01[2], Image_level_01[0], Image_level_01[2], Image_level_01[1]},
                    {Image_level_01[1], Image_level_01[0], Image_level_01[2], Image_level_01[0], Image_level_01[1], Image_level_01[2]},
                    {Image_level_01[2], Image_level_01[0], Image_level_01[1], Image_level_01[1], Image_level_01[0], Image_level_01[2]},
                    {Image_level_01[2], Image_level_01[1], Image_level_01[0], Image_level_01[0], Image_level_01[2], Image_level_01[1]}};*/

 /*   public static int[] Image_level_02 = {R.drawable.icecream_01, R.drawable.icecream_02, R.drawable.icecream_03, R.drawable.icecream_04};
    public static int[][] level_02 = {
            {Image_level_02[0], Image_level_02[1], Image_level_02[2], Image_level_02[3], Image_level_02[0], Image_level_02[1], Image_level_02[2], Image_level_02[3]},
            {Image_level_02[1], Image_level_02[0], Image_level_02[2], Image_level_02[3], Image_level_02[0], Image_level_02[1], Image_level_02[3], Image_level_02[2]},
            {Image_level_02[0], Image_level_02[1], Image_level_02[3], Image_level_02[2], Image_level_02[1], Image_level_02[2], Image_level_02[0], Image_level_02[3]},
            {Image_level_02[3], Image_level_02[1], Image_level_02[0], Image_level_02[2], Image_level_02[0], Image_level_02[1], Image_level_02[3], Image_level_02[2]},
            {Image_level_02[0], Image_level_02[2], Image_level_02[3], Image_level_02[1], Image_level_02[3], Image_level_02[0], Image_level_02[1], Image_level_02[2]},
            {Image_level_02[2], Image_level_02[3], Image_level_02[1], Image_level_02[0], Image_level_02[2], Image_level_02[3], Image_level_02[1], Image_level_02[0]},
            {Image_level_02[2], Image_level_02[0], Image_level_02[1], Image_level_02[3], Image_level_02[1], Image_level_02[3], Image_level_02[0], Image_level_02[2]},
            {Image_level_02[1], Image_level_02[3], Image_level_02[0], Image_level_02[2], Image_level_02[3], Image_level_02[1], Image_level_02[2], Image_level_02[0]}
    };*/


    //public static int[] Image_level_03 = {R.drawable.icecream_01, R.drawable.icecream_02, R.drawable.icecream_03, R.drawable.icecream_04, R.drawable.icecream_05, R.drawable.icecream_06};
   /* public static int[][] level_03 = {
            {Image_level_03[0], Image_level_03[1], Image_level_03[2], Image_level_03[3], Image_level_03[4], Image_level_03[5],
                    Image_level_03[1], Image_level_03[2], Image_level_03[0], Image_level_03[4], Image_level_03[5], Image_level_03[3]},
            {Image_level_03[0], Image_level_03[2], Image_level_03[1], Image_level_03[5], Image_level_03[3], Image_level_03[4],
                    Image_level_03[2], Image_level_03[3], Image_level_03[4], Image_level_03[0], Image_level_03[1], Image_level_03[5]},
            {Image_level_03[0], Image_level_03[1], Image_level_03[2], Image_level_03[3], Image_level_03[4], Image_level_03[5],
                    Image_level_03[0], Image_level_03[3], Image_level_03[2], Image_level_03[1], Image_level_03[5], Image_level_03[4]},
            {Image_level_03[4], Image_level_03[5], Image_level_03[2], Image_level_03[3], Image_level_03[1], Image_level_03[0],
                    Image_level_03[0], Image_level_03[3], Image_level_03[1], Image_level_03[4], Image_level_03[5], Image_level_03[2]},
            {Image_level_03[4], Image_level_03[0], Image_level_03[3], Image_level_03[2], Image_level_03[1], Image_level_03[5],
                    Image_level_03[5], Image_level_03[4], Image_level_03[3], Image_level_03[0], Image_level_03[2], Image_level_03[1]},
            {Image_level_03[1], Image_level_03[0], Image_level_03[3], Image_level_03[2], Image_level_03[5], Image_level_03[4],
                    Image_level_03[5], Image_level_03[4], Image_level_03[3], Image_level_03[0], Image_level_03[2], Image_level_03[1]},
            {Image_level_03[4], Image_level_03[0], Image_level_03[3], Image_level_03[2], Image_level_03[1], Image_level_03[5],
                    Image_level_03[5], Image_level_03[4], Image_level_03[3], Image_level_03[0], Image_level_03[2], Image_level_03[1]},
            {Image_level_03[4], Image_level_03[1], Image_level_03[5], Image_level_03[2], Image_level_03[3], Image_level_03[0],
                    Image_level_03[3], Image_level_03[0], Image_level_03[1], Image_level_03[4], Image_level_03[5], Image_level_03[2]},
            {Image_level_03[3], Image_level_03[5], Image_level_03[4], Image_level_03[1], Image_level_03[0], Image_level_03[2],
                    Image_level_03[3], Image_level_03[0], Image_level_03[1], Image_level_03[4], Image_level_03[5], Image_level_03[2]},
            {Image_level_03[3], Image_level_03[5], Image_level_03[4], Image_level_03[1], Image_level_03[0], Image_level_03[2],
                    Image_level_03[1], Image_level_03[0], Image_level_03[2], Image_level_03[3], Image_level_03[4], Image_level_03[5]},
            {Image_level_03[2], Image_level_03[3], Image_level_03[4], Image_level_03[1], Image_level_03[5], Image_level_03[0],
                    Image_level_03[4], Image_level_03[1], Image_level_03[0], Image_level_03[2], Image_level_03[3], Image_level_03[5]},
            {Image_level_03[2], Image_level_03[3], Image_level_03[5], Image_level_03[3], Image_level_03[0], Image_level_03[1],
                    Image_level_03[4], Image_level_03[1], Image_level_03[0], Image_level_03[2], Image_level_03[3], Image_level_03[5]}
    };*/

   /* public static int[] Image_level_04 = {R.drawable.icecream_01, R.drawable.icecream_02,
            R.drawable.icecream_03, R.drawable.icecream_04,
            R.drawable.icecream_05, R.drawable.icecream_06,
            R.drawable.icecream_07, R.drawable.icecream_08
    };*/

    /*public static int[][] level_04 = {
            {Image_level_04[0], Image_level_04[0], Image_level_04[1], Image_level_04[2],
                    Image_level_04[3], Image_level_04[4], Image_level_04[5], Image_level_04[6],
                    Image_level_04[7], Image_level_04[1], Image_level_04[2], Image_level_04[3],
                    Image_level_04[4], Image_level_04[5], Image_level_04[6], Image_level_04[7]
            },
            {Image_level_04[2], Image_level_04[0], Image_level_04[2], Image_level_04[1],
                    Image_level_04[5], Image_level_04[4], Image_level_04[3], Image_level_04[3],
                    Image_level_04[0], Image_level_04[1], Image_level_04[6], Image_level_04[7],
                    Image_level_04[5], Image_level_04[7], Image_level_04[6], Image_level_04[4]
            },
            {Image_level_04[0], Image_level_04[1], Image_level_04[2], Image_level_04[3],
                    Image_level_04[4], Image_level_04[5], Image_level_04[6], Image_level_04[7],
                    Image_level_04[7], Image_level_04[6], Image_level_04[5], Image_level_04[4],
                    Image_level_04[3], Image_level_04[2], Image_level_04[1], Image_level_04[0]
            },
            {Image_level_04[1], Image_level_04[3], Image_level_04[6], Image_level_04[0],
                    Image_level_04[2], Image_level_04[2], Image_level_04[0], Image_level_04[7],
                    Image_level_04[4], Image_level_04[5], Image_level_04[1], Image_level_04[6],
                    Image_level_04[7], Image_level_04[5], Image_level_04[4], Image_level_04[3]
            },
            {Image_level_04[2], Image_level_04[0], Image_level_04[7], Image_level_04[6],
                    Image_level_04[2], Image_level_04[7], Image_level_04[4], Image_level_04[5],
                    Image_level_04[3], Image_level_04[1], Image_level_04[5], Image_level_04[1],
                    Image_level_04[4], Image_level_04[0], Image_level_04[6], Image_level_04[3]
            },
            {Image_level_04[3], Image_level_04[2], Image_level_04[7], Image_level_04[1],
                    Image_level_04[5], Image_level_04[0], Image_level_04[3], Image_level_04[5],
                    Image_level_04[7], Image_level_04[0], Image_level_04[2], Image_level_04[4],
                    Image_level_04[6], Image_level_04[1], Image_level_04[6], Image_level_04[4]
            },
            {Image_level_04[4], Image_level_04[7], Image_level_04[1], Image_level_04[4],
                    Image_level_04[1], Image_level_04[6], Image_level_04[2], Image_level_04[5],
                    Image_level_04[2], Image_level_04[0], Image_level_04[3], Image_level_04[6],
                    Image_level_04[3], Image_level_04[7], Image_level_04[5], Image_level_04[0]
            },
            {Image_level_04[6], Image_level_04[7], Image_level_04[3], Image_level_04[7],
                    Image_level_04[0], Image_level_04[1], Image_level_04[5], Image_level_04[1],
                    Image_level_04[3], Image_level_04[5], Image_level_04[0], Image_level_04[2],
                    Image_level_04[2], Image_level_04[4], Image_level_04[6], Image_level_04[4]
            },
    };

    public static int[] Image_level_05 = {R.drawable.icecream_01, R.drawable.icecream_02,
            R.drawable.icecream_03, R.drawable.icecream_04,
            R.drawable.icecream_05, R.drawable.icecream_06,
            R.drawable.icecream_07, R.drawable.icecream_08,
            R.drawable.icecream_09, R.drawable.icecream_10
    };*/

   /* public static int[][] level_05 = {
            {
                    Image_level_05[6], Image_level_05[7], Image_level_05[3], Image_level_05[7],
                    Image_level_05[0], Image_level_05[1], Image_level_05[5], Image_level_05[1],
                    Image_level_05[3], Image_level_05[5], Image_level_05[0], Image_level_05[2],
                    Image_level_05[2], Image_level_05[9], Image_level_05[6], Image_level_05[4],
                    Image_level_05[8], Image_level_05[9], Image_level_05[8], Image_level_05[4]
            },
            {
                    Image_level_05[1], Image_level_05[7], Image_level_05[0], Image_level_05[4],
                    Image_level_05[0], Image_level_05[2], Image_level_05[1], Image_level_05[7],
                    Image_level_05[3], Image_level_05[3], Image_level_05[8], Image_level_05[6],
                    Image_level_05[2], Image_level_05[9], Image_level_05[4], Image_level_05[6],
                    Image_level_05[8], Image_level_05[5], Image_level_05[5], Image_level_05[9]
            },
            {
                    Image_level_05[9], Image_level_05[5], Image_level_05[0], Image_level_05[3],
                    Image_level_05[7], Image_level_05[4], Image_level_05[1], Image_level_05[6],
                    Image_level_05[1], Image_level_05[5], Image_level_05[2], Image_level_05[8],
                    Image_level_05[2], Image_level_05[7], Image_level_05[4], Image_level_05[6],
                    Image_level_05[3], Image_level_05[9], Image_level_05[0], Image_level_05[8]
            },
            {
                    Image_level_05[9], Image_level_05[3], Image_level_05[0], Image_level_05[7],
                    Image_level_05[4], Image_level_05[2], Image_level_05[1], Image_level_05[6],
                    Image_level_05[5], Image_level_05[7], Image_level_05[2], Image_level_05[8],
                    Image_level_05[0], Image_level_05[8], Image_level_05[4], Image_level_05[6],
                    Image_level_05[1], Image_level_05[9], Image_level_05[5], Image_level_05[3]
            },
            {
                    Image_level_05[6], Image_level_05[5], Image_level_05[7], Image_level_05[4],
                    Image_level_05[3], Image_level_05[4], Image_level_05[6], Image_level_05[8],
                    Image_level_05[2], Image_level_05[0], Image_level_05[3], Image_level_05[9],
                    Image_level_05[1], Image_level_05[9], Image_level_05[0], Image_level_05[2],
                    Image_level_05[1], Image_level_05[8], Image_level_05[5], Image_level_05[7]
            },
            {
                    Image_level_05[5], Image_level_05[2], Image_level_05[7], Image_level_05[1],
                    Image_level_05[0], Image_level_05[3], Image_level_05[6], Image_level_05[1],
                    Image_level_05[9], Image_level_05[0], Image_level_05[5], Image_level_05[8],
                    Image_level_05[6], Image_level_05[9], Image_level_05[3], Image_level_05[4],
                    Image_level_05[7], Image_level_05[8], Image_level_05[2], Image_level_05[4]
            }
    };*/

    /*public static int[] Image_level_06 = {R.drawable.icecream_01, R.drawable.icecream_02,
            R.drawable.icecream_03, R.drawable.icecream_04,
            R.drawable.icecream_05, R.drawable.icecream_06,
            R.drawable.icecream_07, R.drawable.icecream_08,
            R.drawable.icecream_09, R.drawable.icecream_10,
            R.drawable.icecream_11, R.drawable.icecream_12
    };

    public static int[][] level_06 = {
            {       Image_level_06[0], Image_level_06[3], Image_level_06[4], Image_level_06[8], Image_level_06[11], Image_level_06[5],
                    Image_level_06[10], Image_level_06[1], Image_level_06[2], Image_level_06[5], Image_level_06[9], Image_level_06[4],
                    Image_level_06[7], Image_level_06[11], Image_level_06[2], Image_level_06[1], Image_level_06[6], Image_level_06[10],
                    Image_level_06[8], Image_level_06[6], Image_level_06[9], Image_level_06[3], Image_level_06[0], Image_level_06[7]},

            {       Image_level_06[11], Image_level_06[0], Image_level_06[10], Image_level_06[5], Image_level_06[10], Image_level_06[4],
                    Image_level_06[1], Image_level_06[9], Image_level_06[11], Image_level_06[1], Image_level_06[7], Image_level_06[6],
                    Image_level_06[2], Image_level_06[7], Image_level_06[4], Image_level_06[3], Image_level_06[9], Image_level_06[6],
                    Image_level_06[3], Image_level_06[8], Image_level_06[5], Image_level_06[2], Image_level_06[8], Image_level_06[0]},

            {       Image_level_06[8], Image_level_06[4], Image_level_06[0], Image_level_06[4], Image_level_06[8], Image_level_06[11],
                    Image_level_06[7], Image_level_06[3], Image_level_06[1], Image_level_06[5], Image_level_06[9], Image_level_06[10],
                    Image_level_06[6], Image_level_06[2], Image_level_06[2], Image_level_06[6], Image_level_06[10], Image_level_06[9],
                    Image_level_06[5], Image_level_06[1], Image_level_06[3], Image_level_06[7], Image_level_06[11], Image_level_06[0]},

            {       Image_level_06[10], Image_level_06[9], Image_level_06[3], Image_level_06[0], Image_level_06[5], Image_level_06[8],
                    Image_level_06[11], Image_level_06[6], Image_level_06[2], Image_level_06[1], Image_level_06[2], Image_level_06[9],
                    Image_level_06[7], Image_level_06[5], Image_level_06[1], Image_level_06[3], Image_level_06[6], Image_level_06[10],
                    Image_level_06[8], Image_level_06[4], Image_level_06[0], Image_level_06[4], Image_level_06[7], Image_level_06[11]},

            {       Image_level_06[6], Image_level_06[2], Image_level_06[0], Image_level_06[2], Image_level_06[6], Image_level_06[7],
                    Image_level_06[5], Image_level_06[1], Image_level_06[1], Image_level_06[3], Image_level_06[9], Image_level_06[8],
                    Image_level_06[4], Image_level_06[10], Image_level_06[11], Image_level_06[5], Image_level_06[8], Image_level_06[0],
                    Image_level_06[3], Image_level_06[11], Image_level_06[10], Image_level_06[4], Image_level_06[7], Image_level_06[9]}
    };*/


  /*  public static int[] Image_level_07 = {R.drawable.icecream_01, R.drawable.icecream_02,
            R.drawable.icecream_03, R.drawable.icecream_04,
            R.drawable.icecream_05, R.drawable.icecream_06,
            R.drawable.icecream_07, R.drawable.icecream_08,
            R.drawable.icecream_09, R.drawable.icecream_10,
            R.drawable.icecream_11, R.drawable.icecream_12,
            R.drawable.icecream_13, R.drawable.icecream_14,R.drawable.icecream_15
    };

    public static int[][] level_07 = {
            {
                    Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],
                    Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],
                    Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],
                    Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],
                    Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0]
            },
            {
                    Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],
                    Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],
                    Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],
                    Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],
                    Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0]
            },
            {
                    Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],
                    Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],
                    Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],
                    Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],
                    Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0]
            },
            {
                    Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],
                    Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],
                    Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],
                    Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],
                    Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0]
            },
            {
                    Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],
                    Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],
                    Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],
                    Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],
                    Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0],Image_level_07[0]
            }
    };*/

   /* public static int[] Image_level_08 = {R.drawable.icecream_01, R.drawable.icecream_02,
            R.drawable.icecream_03, R.drawable.icecream_04,
            R.drawable.icecream_05, R.drawable.icecream_06,
            R.drawable.icecream_07, R.drawable.icecream_08,
            R.drawable.icecream_09, R.drawable.icecream_10,
            R.drawable.icecream_11, R.drawable.icecream_12,
            R.drawable.icecream_13, R.drawable.icecream_14,R.drawable.icecream_15,
            R.drawable.icecream_16, R.drawable.icecream_17,R.drawable.icecream_18
    };*/


    public static int[] randomArray(int min,int max,int n){
        int len = max-min+1;//len为该范围内元素的个数

        if(max < min || n > len){
            return null;
        }

        //初始化给定范围的待选数组
        int[] source = new int[len];
        for (int i = min; i < min+len; i++){
           /* if(i >= max) {
                int a = 0;
                a = a+min;
                source[i-min] = a;
            }else {*/
                source[i - min] = i;
            //}
        }

        int[] result = new int[n];
       // List<Integer> mList= new ArrayList<>();
        Random rd = new Random();
        int index = 0;
        for (int i = 0; i < n; i++) {
            //待选数组0到(len-2)随机一个下标
            index = Math.abs(rd.nextInt() % len--);
            //将随机到的数放入结果集
            result[i] = source[index];
            //mList.add(source[index]);
            //将待选数组中被随机到的数，用待选数组(len-1)下标对应的数替换
            source[index] = source[len];
        }
        return result;
    }
}
